package com.ben.chatroom.controller;

import com.ben.chatroom.common.result.Result;
import com.ben.chatroom.service.CommandService;
import org.springframework.stereotype.Controller;

/**
 * @author
 */
@Controller
public class CommonMenuController {

  private final CommandService commandService;

  public CommonMenuController(CommandService commandService) {
    this.commandService = commandService;
  }

  public Result<String> login(String userName, String pwd) {
    commandService.login(userName, pwd);
    return Result.ok();
  }

  /**
   * 发送消息
   *
   * @param userId 用户id
   * @param msg    消息
   */
  public Result<String> sendMsg(String userId, String msg) {
    return Result.ok();
  }

  /**
   * 登出
   * @param userId  用户id
   * @return
   */
  public Result<String> logout(String userId) {
    return Result.ok();
  }

}
